<!--
 * @Descripttion: 
 * @Author: MajorMayer
 * @Date: 2021-08-09 18:17:36
 * @LastEditors: MajorMayer
 * @LastEditTime: 2021-08-18 20:51:46
-->
<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive" />
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" />
  </div>
</template>

<script>
import NProgress from "nprogress";
export default {
  name: "App",
  data() {
    return {
      isLoading: true
    };
  },
  watch: {
    isLoading(val) {
      if (val) {
        NProgress.start();
      } else {
        this.$nextTick(() => {
          NProgress.done();
        });
      }
    },
  },
  created() {
    NProgress.start();
  },
};
</script>